package com.ztom.beans.factory.support.pojo

/**
 * @author ZhangTao
 */
class PropertyValues {
    private val propertyValueList = ArrayList<PropertyValue>()

    fun addPropertyValue(propertyValue: PropertyValue) {
        propertyValueList += propertyValue
    }

    fun getPropertyValue(propertyName: String): PropertyValue? {
        return propertyValueList.firstOrNull { p -> p.name == propertyName }
    }

    fun getPropertyValues(): Array<PropertyValue> {
        return propertyValueList.toTypedArray()
    }
}